package com.example.mapper;

import com.example.entity.Store;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
* @author 朽
*/
@Mapper
public interface StoreMapper extends BaseMapper<Store> {

    @Select("SELECT name FROM store WHERE id = #{storeId}")
    Store selectStoreById(Long storeId);

    @Select("SELECT name FROM store WHERE id = #{storeId}")
    String getStoreNameById(Long storeId);

    @Select("select user_id from store where id=#{storeId}")
    Long fetchUserIdByStoreId(Long storeId);
}




